<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fm" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>	
  	<link rel="stylesheet" href="layerui/css/layui.css" type="text/css"></link>
  </head>
  
  <body>
		<table class="layui-table">
		  <colgroup>
		    <col width="150">
		    <col width="200">
		    <col>
		  </colgroup>
		  <thead>
		    <tr>
		      <th>序号</th>
		      <th>区域</th>
		      <th>检测时间</th>
		      <th>PM10</th>
		      <th>PM2.5</th>
		      <th>监测站</th>
		    </tr> 
		  </thead>
		  <tbody>
		  	<c:forEach items="${list }" var="info">
			  	<tr>
			      <td>${info.id }</td>
			      <td>${info.name }</td>
			      <td>${info.monitorTime }</td>
			      <td>${info.pm10 }</td>
			      <td>${info.pm25 }</td>
			      <td>${info.monitoringStation }</td>
			    </tr>
		  	</c:forEach>
		    <tr>
		    <td colspan="6">
		    	<a href="AirQualityIndexSrevlet?pageIndex=1">首页</a>&nbsp;&nbsp;&nbsp;
		    	<a href="AirQualityIndexSrevlet?pageIndex=${pageIndex-1 }">上一页</a>&nbsp;&nbsp;&nbsp;
		    	<a href="AirQualityIndexSrevlet?pageIndex=${pageIndex+1 }">下一页</a>&nbsp;&nbsp;&nbsp;
		    	<a href="AirQualityIndexSrevlet?pageIndex=1">尾页</a>&nbsp;&nbsp;&nbsp;
		    </td>		    
		   	</tr>

		  </tbody>
		</table>
  
    <script type="text/javascript" src="layerui/layui.js"></script>
    <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
  </body>
</html>
